1. Field of the Invention
The present invention relates to an encoding apparatus for encoding image data, and more particularly to code quantity control.
2. Related Background Art
Prior art code quantity control system for an image encoding apparatus for encoding image data is generally divided into two systems.
One system controls a coding quantity for each frame such that the encoding of each frame is completed within a preset target frame rate.
The other system determines a quantization step by an appropriate method and a next frame determined by a generated code quantity is used for encoding.
The former system is used in an application in which a relatively high image quality and stable frame supply are required such as animation image for storage or broadcast. In this code quantity control, a quantization step by a generated code buffer is controlled, that is, a buffer memory is provided in a preceding stage to a code output and the occupancy of the buffer memory is always monitored, and when the generated code quantity is larger than a target code quantity, the quantization step is rendered relatively large, and when the generated code quantity is smaller than the target code quantity, the quantization step is rendered small.
The latter system is used in an application in which real time encoding/decoding such as a TV telephone or TV conference is effected at a low code rate. In this system, the code quantity control is not effected in a simplest case.
However, in the prior art image encoding apparatus, when low bit rate real time encoding transmission is to be effected, the following problems are encountered whichever of the above two systems is used.
In the former system, that is, the fixed frame rate system, the code once encoded and transmitted cannot be cancelled because of the real time encoding transmission, and if the code quantity generated by the encoding of one frame exceeds a transmission line rate per frame rate, a time lag is involved when the code is decoded. In order to avoid this occurring, the generated code quantity must be suppressed to some extent so that the quantization should be effected in a manner to avoid the deterioration of the image quality. This means the generation of wasteful code which should be absolutely avoided in the low bit rate real time encoding transmission. Since the information quantity of the frame greatly differs from frame to frame, if the same code quantity is allotted to each of the frames, the frame having a small information quantity is of unnecessarily high quality and the frame having a large information quantity is of low image quality. Thus, where the frame rate is fixed, the control of the code rate is very difficult to attain.
In the latter system, that is, the system for determining the quantization step by the appropriate method, single quantization step is frequently used. In this case, when a frame having a large information quantity is encoded, a very large volume of code should be generated and a time required before reading the next frame is very long. On the other hand, when a frame having a small information quantity is to be encoded, one frame of encoding is completed without generating substantial amount of code so that the time required before reading the next frame is very short. As a result, an important image having the large information quantity is not quickly updated at a receiving station and hence at a low frame rate, and on the other hand, a less important image having no substantial change in the image is quickly updated, that is, at a high frame rate. Accordingly, a user cannot designate the number of frames to be transmitted in one second (a frame rate) but can merely indicate to increase or decrease the image quality.